#ifndef PROJECTMODEL_H
#define PROJECTMODEL_H

#include <QAbstractItemModel>

#include "uml/umldiritem.h"
#include "uml/class/umlclassitem.h"
#include "uml/umldatatypes.h"

class ProjectModel : public QAbstractItemModel
{
public:
    ProjectModel(QObject *parent = 0);

    UmlDirItem* projectData();
    void setProjectData(UmlDirItem *rootDir);

    int rowCount(const QModelIndex &parent) const;
    int columnCount(const QModelIndex &parent) const;
    QVariant data(const QModelIndex &index, int role) const;
    QModelIndex index(int row, int column, const QModelIndex &parent) const;
    QModelIndex parent(const QModelIndex &child) const;
    QModelIndex createIndex(int row, int column, void *data) const;

    void insertItem(UmlDirItem *dir, UmlGraphicsItem *item);
    void removeItem(UmlGraphicsItem *item);

protected:
    UmlDirItem *_rootDir;
};

#endif // PROJECTMODEL_H
